PATHMac OS 8 Developer Documentation > Human Interface Toolbox > Menu Manager >

Mac OS 8.5 Menu Manager Reference


InsertMenuItemText

Inserts a menu item into a menu.

pascal OSStatus InsertMenuItemText (
                     MenuHandle menu,
                     ConstStr255Param inString,
                     SInt16 afterItem);
menu
A value of type MenuHandle . Pass a handle to the menu into which the menu item is to be inserted.
inString
A value of type ConstStr255Param . Pass a Pascal string containing the text of the menu item to insert. You can pass a string containing any characters, and these characters will be presented verbatim in the menu item.
afterItem
A signed 16-bit integer. Pass a value specifying the item number of the menu item after which the new menu item is to be inserted. Specify 0 to insert the new menu item at the top of the menu, before the first menu item. Specify a value greater than or equal to the last menu item to append the new item to the end of the menu.
function result
A result code. See Result Codes for the Mac OS 8.5 Menu Manager .

DISCUSSION

The InsertMenuItemText function inserts an enabled menu item containing the specified string into a menu, without evaluating the string for metacharacters, as the pre-Mac OS 8.5 Menu Manager function InsertMenuItem does. You may wish to use InsertMenuItemText if you have a need to present non-alphanumeric characters in a menu item.


VERSION NOTES

Available with Mac OS 8.5 and later.


SEE ALSO

The function AppendMenuItemText .


© 1999 Apple Computer, Inc. — (Last Updated 19 Jan 99)